{% extends 'layout.html' %}

{% block content %}

{% if error_msg %}
{% comment %} 根据这个部分判断一下有没有报错然后搞一下就好了  alert  {% endcomment %}
<a name="error_msg_add"></a>
{% endif %}

    <div class="container">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title"> 新建用户 </h3>
            </div>
            <div class="panel-body">
                <form method="post">
                    {% csrf_token %}

                    <div class="form-group">
                        <label>姓名</label>
                        <input type="text" class="form-control" placeholder="姓名(不输入默认随机)" name="user" />
                    </div>

                    <div class="form-group">
                        <label>密码</label>
                        <input type="text" class="form-control" placeholder="密码(默认随机)" name="pwd"/>
                    </div>

                    <div class="form-group">
                        <label>年龄</label>
                        <input type="text" class="form-control" placeholder="年龄(默认随机)" name="age"/>
                    </div>

                    <div class="form-group">
                        <label>余额</label>
                        <input type="text" class="form-control" placeholder="余额(默认随机)" name="ac"/>
                    </div>


                    <div class="form-group">
                        <label>入职时间(例 2023-08-13)(默认随机)</label>
                        <input type="text" class="form-control" placeholder="2023-08-13" name="ctime"/>
                    </div>

                    <div class="form-group">
                        <label>性别</label>
                        <select class="form-control" name="gd">
                            {% for item in gender_choices %}
                                <option value="{{ item.0 }}">{{ item.1 }}</option>
                            {% endfor %}
                        </select>
                    </div>

                    <div class="form-group">
                        <label>部门</label>
                        <select class="form-control" name="dp">
                            {% for item in depart_list %}
                                <option value="{{ item.id }}">{{ item.title }}</option>
                            {% endfor %}
                        </select>
                    </div>

                    <button type="submit" class="btn btn-primary" name="set_return_13">提 交(回车)</button>
                </form>
            </div>
        </div>
    </div>
{% endblock %}
